﻿using GalaSoft.MvvmLight;
using System.Collections.Generic;
using System.ComponentModel;
using System;

namespace SpringPad.ViewModel
{
    /// <summary>
    /// This class contains properties that the main View can data bind to.
    /// <para>
    /// Use the <strong>mvvminpc</strong> snippet to add bindable properties to this ViewModel.
    /// </para>
    /// <para>
    /// You can also use Blend to data bind with the tool's support.
    /// </para>
    /// <para>
    /// See http://www.galasoft.ch/mvvm
    /// </para>
    /// </summary>
    public class BlockVM : ViewModelBase
    {
        public BlockVM()
        {

        }

        public class Account : INotifyPropertyChanged
        {
            private string _nameP;

            public string name
            {
                get { return _nameP; }
                set { _nameP = value; RaiseProperyChangedEvent("name"); }
            }

            private string _ownerP;

            public string owner
            {
                get { return _ownerP; }
                set { _ownerP = value; RaiseProperyChangedEvent("owner"); }
            }

            private string _typeP;

            public string type
            {
                get { return _typeP; }
                set { _typeP = value; RaiseProperyChangedEvent("type"); }
            }

            private string _providerP;

            public string provider
            {
                get { return _providerP; }
                set { _providerP = value; RaiseProperyChangedEvent("provider"); }
            }

            private string _urlTextP;

            public string urlText
            {
                get { return _urlTextP; }
                set { _urlTextP = value; RaiseProperyChangedEvent("urlText"); }
            }

            private string _usernameP;

            public string username
            {
                get { return _usernameP; }
                set { _usernameP = value; RaiseProperyChangedEvent("username"); }
            }

            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;
        }

        public class Album : Base
        {
            private string _artistP;

            public string artist
            {
                get { return _artistP; }
                set { _artistP = value; RaiseProperyChangedEvent("artist"); }
            }
        }

        public class BlockMetadata : INotifyPropertyChanged
        {
            private string _nameP;

            public string name
            {
                get { return _nameP; }
                set { _nameP = value; RaiseProperyChangedEvent("name"); }
            }

            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;
        }

        public class Book : Base
        {
            private string _authorP;

            public string author
            {
                get { return _authorP; }
                set { _authorP = value; RaiseProperyChangedEvent("author"); }
            }

            private string _coverP;

            public string cover
            {
                get { return _coverP; }
                set { _coverP = value; RaiseProperyChangedEvent("cover"); }
            }

            private int _pagesP;

            public int pages
            {
                get { return _pagesP; }
                set { _pagesP = value; RaiseProperyChangedEvent("pages"); }
            }

            private string _priceP;

            public string price
            {
                get { return _priceP; }
                set { _priceP = value; RaiseProperyChangedEvent("price"); }
            }
            
            
        }

        public class Base : INotifyPropertyChanged
        {
            protected string _nameP;

            public string name
            {
                get { return _nameP; }
                set { _nameP = value; RaiseProperyChangedEvent("name"); }
            }

            protected string _descriptionP;

            public string description
            {
                get { return _descriptionP; }
                set { _descriptionP = value; RaiseProperyChangedEvent("description"); }
            }

            protected string _publicBlurbP;

            public string publicBlurb
            {
                get { return _publicBlurbP; }
                set { _publicBlurbP = value; RaiseProperyChangedEvent("publicBlurb"); }
            }

            protected int _personalRatingP;

            public int personalRating
            {
                get { return _personalRatingP; }
                set { _personalRatingP = value; RaiseProperyChangedEvent("personalRating"); }
            }

            protected List<string> _workbooksP;

            public List<string> workbooks
            {
                get { return _workbooksP; }
                set { _workbooksP = value; RaiseProperyChangedEvent("workbooks"); }
            }


            protected string _userActionP;

            public string userAction
            {
                get { return _userActionP; }
                set { _userActionP = value; RaiseProperyChangedEvent("userAction"); }
            }

            protected string _imageP;

            public string image
            {
                get { return _imageP; }
                set { _imageP = value; RaiseProperyChangedEvent("image"); }
            }

            protected BlockMetadata _metadataP;

            public BlockMetadata metadata
            {
                get { return _metadataP; }
                set { _metadataP = value; RaiseProperyChangedEvent("metadata"); }
            }

            protected List<string> _tagsP;

            public List<string> tags
            {
                get { return _tagsP; }
                set { _tagsP = value; RaiseProperyChangedEvent("tags"); }
            }

            protected bool _flaggedP;

            public bool flagged
            {
                get { return _flaggedP; }
                set { _flaggedP = value; RaiseProperyChangedEvent("flagged"); }
            }

            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;
        }

        public class Bookmark : Base
        {
            private string _textP;

            public string text
            {
                get { return _textP; }
                set { _textP = value; RaiseProperyChangedEvent("text"); }
            }
            
        }

        public class CheckListItem : INotifyPropertyChanged
        {
            private string _nameP;

            public string name
            {
                get { return _nameP; }
                set { _nameP = value; RaiseProperyChangedEvent("name"); }
            }

            private bool _completeP;

            public bool complete
            {
                get { return _completeP; }
                set { _completeP = value; RaiseProperyChangedEvent("complete"); }
            }
            
            
            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;
        }

        public class CheckList : Base
        {
            private List<CheckListItem> _itemsP;

            public List<CheckListItem> items
            {
                get { return _itemsP; }
                set { _itemsP = value; RaiseProperyChangedEvent("items"); }
            }
        }

        public class FavoriteItem : INotifyPropertyChanged
        {
            private string _nameP;

            public string name
            {
                get { return _nameP; }
                set { _nameP = value; RaiseProperyChangedEvent("name"); }
            }

            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;
        }

        public class Link : INotifyPropertyChanged
        {
            private string _nameP;

            public string name
            {
                get { return _nameP; }
                set { _nameP = value; RaiseProperyChangedEvent("name"); }
            }

            private string _urlP;

            public string url
            {
                get { return _urlP; }
                set { _urlP = value; RaiseProperyChangedEvent("url"); }
            }

            private string _titleP;

            public string title
            {
                get { return _titleP; }
                set { _titleP = value; RaiseProperyChangedEvent("title"); }
            }

            private BlockMetadata _metadataP;

            public BlockMetadata metadata
            {
                get { return _metadataP; }
                set { _metadataP = value; RaiseProperyChangedEvent("metadata"); }
            }
            
            

            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }
            public event PropertyChangedEventHandler PropertyChanged;
        }

        public class Movie : Base
        {
            private string _ratingP;

            public string rating
            {
                get { return _ratingP; }
                set { _ratingP = value; RaiseProperyChangedEvent("rating"); }
            }

            private string _thumbUrlP;

            public string thumbUrl
            {
                get { return _thumbUrlP; }
                set { _thumbUrlP = value; RaiseProperyChangedEvent("thumbUrl"); }
            }

            private string _plotP;

            public string plot
            {
                get { return _plotP; }
                set { _plotP = value; RaiseProperyChangedEvent("plot"); }
            }

            private string _releaseDateP;

            public string releaseDate
            {
                get { return _releaseDateP; }
                set { _releaseDateP = value; RaiseProperyChangedEvent("releaseDate"); }
            }

            private string _runTimeP;

            public string runTime
            {
                get { return _runTimeP; }
                set { _runTimeP = value; RaiseProperyChangedEvent("runTime"); }
            }
        }

        public class Note : Base
        {
            private bool _richP;

            public bool rich
            {
                get { return _richP; }
                set { _richP = value; RaiseProperyChangedEvent("rich"); }
            }

            private string _urlP;

            public string url
            {
                get { return _urlP; }
                set { _urlP = value; RaiseProperyChangedEvent("url"); }
            }

            private string _textP;

            public string text
            {
                get { return _textP; }
                set { _textP = value; RaiseProperyChangedEvent("text"); }
            }
        }

        public class PackingList : Base
        {
            private List<CheckListItem> _itemsP;

            public List<CheckListItem> items
            {
                get { return _itemsP; }
                set { _itemsP = value; RaiseProperyChangedEvent("items"); }
            }
        }

        public class SpringpadUser : Base
        {
            private string _firstNameP;

            public string firstName
            {
                get { return _firstNameP; }
                set { _firstNameP = value; RaiseProperyChangedEvent("firstName"); }
            }

            private string _lastNameP;

            public string lastName
            {
                get { return _lastNameP; }
                set { _lastNameP = value; RaiseProperyChangedEvent("lastName"); }
            }

            private string _usernameP;

            public string username
            {
                get { return _usernameP; }
                set { _usernameP = value; RaiseProperyChangedEvent("username"); }
            }

            private string _securityTokenP;

            public string securityToken
            {
                get { return _securityTokenP; }
                set { _securityTokenP = value; RaiseProperyChangedEvent("securityToken"); }
            }

            private string _themePublicP;

            public string themePublic
            {
                get { return _themePublicP; }
                set { _themePublicP = value; RaiseProperyChangedEvent("themePublic"); }
            }
        }

        public class TVShow : Base
        {
            private string _ratingP;

            public string rating
            {
                get { return _ratingP; }
                set { _ratingP = value; RaiseProperyChangedEvent("rating"); }
            }

            private string _thumbUrlP;

            public string thumbUrl
            {
                get { return _thumbUrlP; }
                set { _thumbUrlP = value; RaiseProperyChangedEvent("thumbUrl"); }
            }

            private string _plotP;

            public string plot
            {
                get { return _plotP; }
                set { _plotP = value; RaiseProperyChangedEvent("plot"); }
            }

            private string _seasonP;

            public string season
            {
                get { return _seasonP; }
                set { _seasonP = value; RaiseProperyChangedEvent("season"); }
            }
        }

        public class Task : Base
        {
            private DateTime _dateP;

            public DateTime date
            {
                get { return _dateP; }
                set { _dateP = value; RaiseProperyChangedEvent("date"); }
            }

            private List<string> _assigneesP;

            public List<string> assignees
            {
                get { return _assigneesP; }
                set { _assigneesP = value; RaiseProperyChangedEvent("assignees"); }
            }

            private bool _completeP;

            public bool complete
            {
                get { return _completeP; }
                set { _completeP = value; RaiseProperyChangedEvent("complete"); }
            }

            private bool _hasDueDateP;

            public bool hasDueDate
            {
                get { return _hasDueDateP; }
                set { _hasDueDateP = value; RaiseProperyChangedEvent("hasDueDate"); }
            }
            
            
            
        }
    }
}

/*
            protected void RaiseProperyChangedEvent(string property)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(property));
                }
            }
*/